package com.galeno.json;

import com.google.gson.Gson;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 2021/7/2522:55
 */
public class Demo2 {
    public static void main(String[] args) {
        MovieBean movieBean=new MovieBean();
        movieBean.set(1,4.5,"123456",1001);
        Gson gs = new Gson();
        String s = gs.toJson(movieBean);
        MovieBean movieBean1 = gs.fromJson(s, MovieBean.class);
        System.out.println(movieBean1);


    }
}
